<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="${pageContext.request.contextPath}/parts/itemjs/supervise/supervise.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/parts/itemjs/ys_stock/purchase.js"></script>
<title>采购单信息列表</title>
</head>
<body>
<form action="<%=path %>/purchase.action" method="post" >
<table width="80%" border="0" cellpadding="0" cellspacing="0" >
  <tr>
     <td>
     <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="MainBody">
		<tr>
    		<td width="760" class="MainBody_title"><hello:forValue type="title" /></td>
		</tr>
      <tr>
        <td valign="top" >
        <table border="0" cellspacing="0" cellpadding="0" style="margin: 5px 0 10px 20px;width:90%">
			<tr height="35">
				<td align="right" ><input name="pid" type="hidden" value=""/><input name="operate" type="hidden" value=""/></td>
				<td align="right" >
				<input type="button" value="查询" class="btn" onclick="doSel()"/>
				&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="添加" class="btn" onclick="doInspage()"/>
				&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="导出" class="btn" onclick="doPrint()"/>
				</td>
			</tr>
			<tr >
				<td colspan="2" class="box01">
				<SPAN>采购单编号：<input type="text" name="purchaseid" value="${purchaseid}" maxlength="30"></SPAN>
				<SPAN>供应商名称：<input type="text" name="suppliername" value="${suppliername}" maxlength="30"></SPAN>
				<SPAN>采购员：<input type="text" name="buyer" value="${buyer}" maxlength="30"></SPAN>
				<SPAN>下单日期：<input type="text" name="orderbegin" value="${orderbegin}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30">
				&nbsp;&nbsp;至&nbsp;&nbsp;<input type="text" name="orderend" value="${orderend}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30"></SPAN>
				<SPAN>交货日期：<input type="text" name="deliverybegin" value="${deliverybegin}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30">
				&nbsp;&nbsp;至&nbsp;&nbsp;<input type="text" name="deliveryend" value="${deliveryend}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30"></SPAN>
				</td>
			</tr>
		</table>
        <table border="0" cellpadding="0" cellspacing="0"  class="MainBody_table">
           <tr>
				<th width="13%" nowrap="nowrap" onclick="doOrder('purchaseid')">采购单编号</th>
				<th width="20%" nowrap="nowrap" onclick="doOrder('suppliername')">供应商名称</th>
				<th width="10%" nowrap="nowrap" onclick="doOrder('orderdate')">下单日期</th>
				<th width="10%" nowrap="nowrap" onclick="doOrder('deliverydate')">交货日期</th>
				<th width="8%" nowrap="nowrap" onclick="doOrder('carriage')">运输类型</th>
				<th width="8%" nowrap="nowrap" onclick="doOrder('progress')">采购进度</th>
				<th width="10%" nowrap="nowrap" onclick="doOrder('buyer')">采购员</th>
				<th width="8%" nowrap="nowrap" onclick="doOrder('finalflag')">财务状态</th>
				<th width="15%" nowrap="nowrap">操作</th>
			</tr>
			<c:forEach items="${listinfo}" varStatus="status" var="rows">
			<tr>
				<td nowrap="nowrap"><a href="#" title="采购单详细信息" onclick="doSelinfo('${rows.purchaseid}')">${rows.purchaseid}</a></td>
				<td nowrap="nowrap"><a href="#" title="供应商详细信息" onclick="doSelsupp('${rows.supplierid}')">${rows.suppliername}</a></td>
				<td nowrap="nowrap">${rows.orderdate}</td>
				<td nowrap="nowrap">${rows.deliverydate}</td>
				<td nowrap="nowrap">${rows.carriage}</td>
				<td nowrap="nowrap">${rows.progress}</td>
				<td nowrap="nowrap">${rows.buyer}</td>
				<td nowrap="nowrap">${rows.finalflag}</td>
				<td nowrap="nowrap">
				<c:if test="${rows.progress!='到货'}">
				<span class='RoleSpan' onclick="doLabel('${rows.purchaseid}',this)" title='标记物料到货入库' style='color: blue;' onmouseout="doMsOut('blue')" onmouseover='doMsOver()'>到货</span>&nbsp;&nbsp;
				<span class='RoleSpan' onclick="doUpdType('${rows.purchaseid}')" title='修改采购单信息' style='color: green;' onmouseout="doMsOut('green')" onmouseover='doMsOver()'>修改</span>&nbsp;&nbsp;
				<span class='RoleSpan' onclick="doDeltype('${rows.purchaseid}')" title='删除该采购单' style='color: red;' onmouseout="doMsOut('red')" onmouseover='doMsOver()'>删除</span>
				</c:if>
				<c:if test="${rows.progress=='到货'}">
				<span class='RoleSpan' onclick="doAgain('${rows.purchaseid}')" title='重订采购单' style='color: green;' onmouseout="doMsOut('green')" onmouseover='doMsOver()'>重订采购单</span>
				</c:if>
				</td> 
			</tr>
			</c:forEach>
		<c:if test="${empty listinfo}">
			<tr>
				<td colspan="9" align="center">暂时没有您可以浏览的数据</td>
			</tr>
		</c:if>
          </table>
          <c:if test="${!empty listinfo}">
          <table border="0" cellpadding="0" cellspacing="0" class="MainBody_fun">
            <tr>
              <td>
               <hello:AllPage />
			  </td>
            </tr>
          </table>
          </c:if>
          </td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>